/**
 * 初始化下拉框信息
 */
function initDictToSelect(code) {
    var html = '<option value="">请选择</option>';
    if (code != "" && code != undefined) {
        var ajax = new $ax(Feng.ctxPath + "/dict/selectListByParentCode", function (data) {
            for (var i = 0; i < data.length; i++) {
                html += '<option value="' + data[i].code + '">' + data[i].name + '</option>';
            }
        }, function (data) {
            Feng.error("初始化数据失败!" + data.responseJSON.message + "!");
        });
        ajax.set("code", code);
        ajax.start();
    }
    return html;
}

/**
 * 获取字典返回数组
 */
function arrayFromDict(code) {
    var array = new Array();
    if (code != "" && code != undefined) {
        var ajax = new $ax(Feng.ctxPath + "/dict/selectListByParentCode", function (data) {
            for (var i = 0; i < data.length; i++) {
                array[i] = data[i].name;
            }
        }, function (data) {
            Feng.error("初始化数据失败!" + data.responseJSON.message + "!");
        });
        ajax.set("code", code);
        ajax.start();
    }
    return array;
}

